package com.smartian.v2;

import java.text.SimpleDateFormat;
import java.util.regex.Pattern;

/**
 * Created by tianweitong on 2020/3/13.
 */

public interface TextPattern {

    public static final SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd");
    public static final SimpleDateFormat sTimeFormat = new SimpleDateFormat("HH:mm");

    public static final SimpleDateFormat sDateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    public static final SimpleDateFormat sWeekTimeFormat = new SimpleDateFormat("E HH:mm");
    public static final SimpleDateFormat sMonthTimeFormat = new SimpleDateFormat("dd HH:mm");
    public static final SimpleDateFormat sYearsTimeFormat = new SimpleDateFormat("MM-dd HH:mm");

    public static final int REPEAT_NONE = 0;
    public static final int REPEAT_EVERY_DAY = 1;
    public static final int REPEAT_EVERY_WORK_DAY = 2;
    public static final int REPEAT_WEELY = 3;
    public static final int REPEAT_MONTHLY = 4;
    public static final int REPEAT_YEARLY = 5;

    String WORD_DAY = "日";
    String WORD_WEEK = "周";
    String WORD_WEEK_ALIAS_1 = "星期";
    String WORD_WEEK_ALIAS_2 = "礼拜";
    String WORD_MONTH = "月";
    String WORD_MONTH_UNIT = "个月";
    String WORD_YEAY = "年";
    String WORD_LOCAL_LIANG = "两";
    String WORD_EXP_EVERY = "每(隔|个)?(\\d|俩|仨|两|一|二|三|四|五|六|七|八|九|十)*(个)?";

    String WORD_THIS_MONTH = "(这|本)月";
    String WORD_THIS_YEAR = "(今|本)年";
    String WORD_NEXT_NEXT_YEAR = "(后|下下一)年";
    String WORD_NEXT_YEAR = "(下一|明)年";
    String WORD_NEXT_MONTH = "下[个]?月";

    String WORD_TODAY = "今(日|天)";

    String[] LOCAL_CHINESE_NUMBER_WORD = {"一", "俩", "仨"};

    String[] CHINES_NUMBER_UNITS = {"十", "百", "千", "万"};

    String[] CHINESE_WORD_NUMBER = new String[]{"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};

    Pattern REG_EXP_DAY = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "(日|天|晚){1}"));
    Pattern REG_EXP_DAY_IN_MONTH = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "半月"));
    Pattern REG_EXP_WEEK = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "(周|礼拜|星期){1}"));
    Pattern REG_EXP_MONTH = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "月"));
    Pattern REG_EXP_MONTH_IN_YEAR = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "(季度|半年){1}"));
    Pattern REG_EXP_YEAR = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "年"));
    Pattern REG_EXP_WORK_DAY = Pattern.compile(String.format("%s%s", TextPattern.WORD_EXP_EVERY, "工作日"));
    Pattern REG_EXP_YEAR_ONLY = Pattern.compile("\\d{2,4}年");

    Pattern REG_EXP_TODAY = Pattern.compile("今(日|晚|天|早)");
    Pattern REG_EXP_TOMORROW = Pattern.compile("明(日|晚|天|早)");
    Pattern REG_EXP_TOMORROW_TOMORROW = Pattern.compile("后(日|晚|天|早)");

    Pattern REG_EXP_DATE_LEVEL_1 = Pattern.compile("(\\w{1,4}年)?\\w{1,2}月\\w{1,2}(日|号)?");
    Pattern REG_EXP_DATE_LEVEL_2 = Pattern.compile("(\\d{2,4}年)?\\d{1,2}月\\d{1,2}(日|号)?");
    Pattern REG_EXP_DATE_LEVEL_3 = Pattern.compile("(\\w{1,4}年)?\\d{1,2}月\\d{1,2}(日|号)?");

    Pattern REG_EXP_WEEK_DATE = Pattern.compile("(周|礼拜|星期){1}(天|末|日|六|五|四|三|二|一|\\d){1}");

    Pattern REG_EXP_EVERY_EXECLUDE = Pattern.compile("(两|俩|仨|\\d)+(两|俩|仨)");

    String WORD_EMPTY = "";


    String WORD_NEXT_PATTERN = "\\w{1,}%s[之|以]{0,1}后";
    java.lang.String TOMORROW = "明天";
    java.lang.String NEXT_MONTH_WORD = "(下月|下个月|下一个月)";
    java.lang.String NEXT_WEEK_WORD = "(下周|下星期|下礼拜|下一周|下一星期|下一个礼拜|下一个星期)";
    java.lang.String NEXT_YEAR_WORD = "(下一年|明年)";


    Pattern REG_EXP_TIME = Pattern.compile("\\d{1,2}:\\d{1,2}");
    Pattern REG_EXP_TIME_1 = Pattern.compile("\\w{1,3}点(过)?\\w{1,3}分");
    Pattern REG_EXP_TIME_2 = Pattern.compile("\\d{1,2}点(过)?\\d{1,2}(分)?");
    Pattern REG_EXP_TIME_3 = Pattern.compile("\\w{1,2}点\\w{1,2}刻");
    Pattern REG_EXP_TIME_4 = Pattern.compile("午时\\w{1,2}刻");
    Pattern REG_EXP_TIME_5 = Pattern.compile("\\d{1,2}点(整|钟|半)?");
    String WORD_HOUR_POINT = "点";
    String WORD_MINUTE = "分";
    String WORD_HOUR = "时";
    String WORD_HOUR_UNIT = "小时";
    String WORD_15_MINUTES = "刻";
    String WORD_TIME_AFTER = "过";
    String WORD_TIME_MID_DAY = "午时";
    String WORD_TIME_HOUR_HALE = "半小时";
    String WORD_TIME_MINUTE_HALE = "半分钟";


    String[][] TIME_APM_LOCATOR = {
            {"凌晨", "清晨", "黎明"},
            {"上午", "早上", "早晨", "晌午", "今早", "明早", "早餐时间", "早饭时间", "起床时间"},
            {"中午", "午时", "午餐时间", "午饭时间", "正午", "午休时间"},
            {"下午", "午后", "天黑前"},
            {"晚上", "傍晚", "今夜", "今晚", "明晚", "晚饭时间", "晚餐时间", "夜晚", "黄金时段", "天黑后"}
    };
    String WORD_NIGHT = "晚";
    String WORD_DAY_ALIAS = "号";
    String WORD_DAY_ALIAS_2 = "天";
    CharSequence WORD_6_MONTH_IN_YEAR_ALIAS = "半年";
    CharSequence WORD_3_MONTH_IN_YEAR_ALIAS = "季度";
    CharSequence DAY_15_MONTH = "半月";
    String WORD_END_ALIAS = "末";
    String WORD_MINUTE_ALIAS = "分钟";
    String WORD_SECOND = "秒";
    String TIME_SEPATOR = ":";
    String WORD_TWO_YEAR = "2月"; //数量
    String WORD_TWO_DAY = "2天";
    Pattern REG_EXP_NEXT_MONTH = Pattern.compile(WORD_NEXT_MONTH);

    String WORD_START = "初";

    Pattern[] PATTERN_LOCATOR_LUNAR = {
            Pattern.compile("(\\w{1,4}年)?(农历|阴历)?\\w{1,3}月(初一|初二|初三|初四|初五|初六|初七|初八|初九|初十|初|中旬|中|底|下旬|上旬)"),
            Pattern.compile("(\\w{1,4}年)?(农历|阴历)\\w{1,3}月(初一|初二|初三|初四|初五|初六|初七|初八|初九|初十|初|中旬|中|底|下旬|上旬)?")
    };

    Pattern PATTERN_CURRENT_MONTH = Pattern.compile("(本|这|这个)月");
    Pattern PATTERN_NEXT_MONTH = Pattern.compile("(下|下个|下一个)月");
    Pattern PATTERN_NEXT_NEXT_MONTH = Pattern.compile("(下下个)月");
    Pattern PATTERN_LAST_MONTH = Pattern.compile("(上|上个|上一个)月");

    String WORD_MIDDLE_1 = "中";
    String WORD_MIDDLE_2 = "中旬";
    String WORD_END_1 = "底";
    String WORD_END_2 = "末";

    Pattern PATTERN_LUNAR = Pattern.compile("(农历|阴历)");

}
